package zx.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author ZX
 * @date 2021/3/3
 */
@Configuration
public class ApplicationContextConfig
{

    /**
     *   @LoadBalanced 标注此注解后，RestTemplate就具有了客户端负载均衡能力
     */
   /* @LoadBalanced*/
    @Bean
    public RestTemplate getRestTemplate()
    {

        return new RestTemplate();
    }
}
